#include "../../Headers/Classes/db.h"

DB::DB(QString databaseName)
{
    this->databaseName = databaseName;
    this->db = QSqlDatabase::database();
    if (!db.isOpen())
    {
        db = QSqlDatabase::addDatabase("QSQLITE");
        db.setDatabaseName(databaseName);
        db.open();
    }
}

void DB::RemoveConnection()
{
    db.close();
}
